// model/recipe_state.dart
import 'package:casdon/modules/recipe/data/model/cook_module_content_model.dart';

class CookModuleContentState {
  final List<CookModuleContentModel> data;
  final int page;
  final bool hasMore;
  final bool isLoadingMore;

  CookModuleContentState copyWith({
    List<CookModuleContentModel>? data,
    int? page,
    bool? hasMore,
    bool? isLoadingMore,
  }) {
    return CookModuleContentState(
      data: data ?? this.data,
      page: page ?? this.page,
      hasMore: hasMore ?? this.hasMore,
      isLoadingMore: isLoadingMore ?? this.isLoadingMore,
    );
  }

  factory CookModuleContentState.initial() => CookModuleContentState(
        data: [],
        page: 1,
        hasMore: false,
        isLoadingMore: false,
      );

  CookModuleContentState({
    required this.data,
    this.page = 1,
    this.hasMore = false,
    this.isLoadingMore = false,
  });
}
